#pragma once

#ifndef MYEXCEPT_H
#define MYEXCEPT_H

#include <iostream>
#include <stdexcept>

class wruntime_error {
public:
	wruntime_error(std::wstring message)
		: error_message(message) {
	}
	std::wstring what() {/*
		size_t *ignore = new size_t(0);
		char *retVal = new char[this->error_message.size() + 1];
		wsprintfA()
				wsprintf(retVal, this->error_message.size(), "%ws", this->error_message.c_str());
		std::string ret = retVal;
		std::cout << retVal;
		delete[] retVal;*/
		return this->error_message.c_str();
	}

private:
	std::wstring error_message;
};

#ifdef UNICODE
#define runtimeError wruntime_error
#else
#define runtimeError runtime_error
#endif// UNICODE

#endif// !MYEXCEPT_H
